<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib prefix="rapid" uri="http://www.rapid-framework.org.cn/rapid"%>

<rapid:override name="left">
	<div id="primary" class="content-area">
		<main id="main" class="site-main" role="main">	
		  <c:forEach items="${pageInfo.list}" var="a">
				<article class="post type-post">
					<figure class="thumbnail">
						<a href="/article/${a.articleId}"> 
							<img width="280" height="210"	src="/resources/img/thumbnail/random/img_${a.articleId%15}.jpg" class="attachment-content size-content wp-post-image" >
						</a>
						<span class="cat">
							 <a href="/category/${a.categoryList[1].categoryId}">  ${a.categoryList[1].categoryName}</a>
						</span>
					</figure>
	
					<header class="entry-header">
						<h2 class="entry-title">
							<a href="/article/${a.articleId}" rel="bookmark">${a.articleTitle}</a>
						</h2>
					</header>
					
					<div class="entry-content">
						<div class="archive-content"> ${a.articleSummary}...</div>
						<span class="title-l"></span> 
						<span class="new-icon"> 
								 <c:choose>
	                                <c:when test="${a.articleStatus == 2}">
	                                    <i class="fa fa-bookmark-o"></i>
	                                </c:when>
	                                <c:otherwise>
	                                    <jsp:useBean id="nowDate" class="java.util.Date"/>
	                                    <c:set var="interval"  value="${nowDate.time - a.articleCreateTime.time}"/><%--时间差毫秒数--%>
	                                    <fmt:formatNumber value="${interval/1000/60/60/24}" pattern="#0"   var="days"/>
	                                    <c:if test="${days <= 7}">NEW</c:if>
	                                </c:otherwise>
	                            </c:choose>
						</span> 
						
						<span class="entry-meta"> 
							 <span class="date">  <fmt:formatDate value="${a.articleCreateTime}" pattern="yyyy年MM月dd日"/>  &nbsp;&nbsp; </span> 
						     <span class="views"> <i class="fa fa-eye"></i>	  ${a.articleViewCount} views </span> 
						     <span class="comment">
						     	&nbsp;&nbsp; 
						     	<a href="/article/${a.articleId}#comments" rel="external nofollow"> 
						     			<i class="fa fa-comment-o"></i> 
						     		    <c:choose>
	                                        <c:when test="${a.articleCommentCount == 0}">
	                                           	 发表评论
	                                        </c:when>
	                                        <c:otherwise>
	                                            ${a.articleCommentCount}
	                                        </c:otherwise>
	                                    </c:choose>
						     	</a>
							 </span>
						</span>
						<div class="clear"></div>
					</div>
				
					<span class="entry-more"> 
						<a href="/article/${a.articleId}" rel="bookmark"> 阅读全文 </a>
					</span>
				</article>
			</c:forEach>
		</main>
		
		<nav class="navigation pagination" role="navigation">
			<div class="nav-links">
				<a class="page-numbers current">1</a> <a class="page-numbers"
					href="/article?pageIndex=2">2</a> <a class="page-numbers"
					href="/article?pageIndex=3">3</a> <a href="/article?pageIndex=4">4</a>
				<a class="page-numbers" href="/article?pageIndex=2"> <span
					class="fa fa-angle-right"></span>
				</a>
			</div>
		</nav>
	</div>
</rapid:override>


<rapid:override name="right">
	<div id="sidebar" class="widget-area all-sidebar"
		style="position: relative; overflow: visible; box-sizing: border-box; min-height: 1px;">

		<aside class="widget about">
			<h3 class="widget-title">
				<i class="fa fa-bars"></i>关于本站
			</h3>
			<div id="feed_widget">
				<div class="feed-about">
					<div class="about-main">
						<div class="about-img">
							<img src="/uploads/2018/11/avatar(3).jpg" alt="QR Code">
						</div>
						<div class="about-name">博客初心</div>
						<div class="about-the">程序人生，永不止步</div>
					</div>
					<div class="clear"></div>
					<ul>
						<li class="weixin"><a title="微信" id="weixin_btn"
							rel="external nofollow"> <i class="fa fa-weixin"> </i>
								<div id="weixin_code" class="hide">
									<img src="/uploads/2017/10/20171006224906122.jpg" alt="">
								</div>
						</a></li>
						<li class="tqq"><a target="blank" rel="external nofollow"
							href="http://wpa.qq.com/msgrd?V=3&amp;uin=847064370&amp;Site=QQ&amp;Menu=yes"
							title="QQ在线"> <i class="fa fa-qq"></i>
						</a></li>
						<li class="tsina"><a title=""
							href="http://weibo.com/5936412667" target="_blank"
							rel="external nofollow"> <i class="fa fa-weibo"></i>
						</a></li>
						<li class="feed"><a title="" href="https://github.com/saysky"
							target="_blank" rel="external nofollow"> <i
								class="fa fa-github"></i>
						</a></li>
					</ul>
					<div class="about-inf">
						<span class="about-pn">文章 35</span> <span class="about-cn">留言
							26</span>
					</div>
				</div>
			</div>
			<div class="clear"></div>
		</aside>
		<aside id="php_text-22" class="widget php_text">
			<h3 class="widget-title">
				<i class="fa fa-bars"></i>网站概况
			</h3>
			<div class="textwidget widget-text">
				<ul class="site-profile">
					<li><i class="fa fa-file-o"></i> 文章总数：35 篇</li>
					<li><i class="fa fa-commenting-o"></i> 留言数量：26 条</li>
					<li><i class="fa fa-folder-o"></i> 分类数量：24 个</li>
					<li><i class="fa fa-tags"></i> 标签总数：36 个</li>
					<li><i class="fa fa-link"></i> 链接数量：3 个</li>
					<li><i class="fa fa-eye"></i> 浏览总量：146 次</li>
					<li><i class="fa fa-pencil-square-o"></i> 最后更新： <span
						style="color: #2F889A"> 2020年05月11日</span></li>
				</ul>
			</div>
			<div class="clear"></div>
		</aside>
		<aside class="widget">
			<h3 class="widget-title">
				<i class="fa fa-bars"></i>所有标签
			</h3>
			<div class="tagcloud">
				<a href="/tag/1" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> Java</a> <a href="/tag/2"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					算法</a> <a href="/tag/3" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> 数据结构</a> <a href="/tag/4"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					C</a> <a href="/tag/5" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> 操作系统</a> <a href="/tag/6"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					计算机网络</a> <a href="/tag/8" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> 面试题</a> <a href="/tag/9"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					数据库</a> <a href="/tag/10" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> MySQL</a> <a href="/tag/11"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					Spring</a> <a href="/tag/12" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> SpringMVC</a> <a href="/tag/13"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					MyBatis</a> <a href="/tag/14" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> JVM</a> <a href="/tag/15"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					设计模式</a> <a href="/tag/16" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> 网络编程</a> <a href="/tag/17"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					IO</a> <a href="/tag/18" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> JSP</a> <a href="/tag/19"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					Servlet</a> <a href="/tag/20" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> JavaWeb</a> <a href="/tag/21"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					Hibernate</a> <a href="/tag/22"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					SQL</a> <a href="/tag/24" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> Redis</a> <a href="/tag/25"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					SPA</a> <a href="/tag/26" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> SpringCloud</a> <a href="/tag/27"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					Dubbo</a> <a href="/tag/28" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> EDAS</a> <a href="/tag/29"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					MongoDB</a> <a href="/tag/31" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> SpringBoot</a> <a href="/tag/32"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					ElasticSearch</a> <a href="/tag/33"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					Docker</a> <a href="/tag/34" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> Jenkins</a> <a href="/tag/35"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					Vue</a> <a href="/tag/36" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> IDEA</a> <a href="/tag/37"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					Shiro</a> <a href="/tag/38" class="tag-link-129 tag-link-position-1"
					style="font-size: 14px;"> RocketMQ</a> <a href="/tag/39"
					class="tag-link-129 tag-link-position-1" style="font-size: 14px;">
					C++</a>
				<div class="clear"></div>
			</div>
			<div class="clear"></div>
		</aside>
		<aside id="recent_comments-2"
			class="widget recent_comments wow fadeInUp" data-wow-delay="0.3s">
			<h3 class="widget-title">
				<i class="fa fa-bars"></i>近期评论
			</h3>
			<div id="message" class="message-widget">
				<ul>
					<li style="border: none;"><a
						href="/article/6/#anchor-comment-29" rel="external nofollow">
							<span class="comment_author"> <strong>小程</strong>
						</span> 内容还可以,主要是因为现在用struts2的人越来越多了起来,而且这确实是一个好框架
					</a></li>
					<li style="border: none;"><a
						href="/article/6/#anchor-comment-22" rel="external nofollow">
							<span class="comment_author"> <strong>范鸽</strong>
						</span>
							我们公司现在用的就是springmvc框架感觉还好,比struts2差不了多少,框架就是那么回事吧,其实框架带来的麻烦比带来的方便多
					</a></li>
					<li style="border: none;"><a
						href="/article/2/#anchor-comment-20" rel="external nofollow">
							<span class="comment_author"> <strong>陈聪</strong>
						</span> 对于web开发者来说,没有什么比处理乱码更轻松的事了,以后中国统一世界了,乱码的问题自然也就不存在了
					</a></li>
					<li style="border: none;"><a
						href="/article/2/#anchor-comment-19" rel="external nofollow">
							<span class="comment_author"> <strong>tina</strong>
						</span> 我是tina,我不喜欢发表评论
					</a></li>
					<li style="border: none;"><a
						href="/article/2/#anchor-comment-18" rel="external nofollow">
							<span class="comment_author"> <strong>scott</strong>
						</span> 世人皆醉我独醒
					</a></li>
					<li style="border: none;"><a
						href="/article/2/#anchor-comment-17" rel="external nofollow">
							<span class="comment_author"> <strong>saysky</strong>
						</span> 11111
					</a></li>
					<li style="border: none;"><a
						href="/article/2/#anchor-comment-16" rel="external nofollow">
							<span class="comment_author"> <strong>苏桂华</strong>
						</span> xxxxx
					</a></li>
					<li style="border: none;"><a
						href="/article/13/#anchor-comment-13" rel="external nofollow">
							<span class="comment_author"> <strong>瑞克斯</strong>
						</span> 贾克斯你好，我是瑞克斯
					</a></li>
					<li style="border: none;"><a
						href="/article/13/#anchor-comment-12" rel="external nofollow">
							<span class="comment_author"> <strong>贾克斯</strong>
						</span> 我是贾克斯
					</a></li>
					<li style="border: none;"><a
						href="/article/13/#anchor-comment-11" rel="external nofollow">
							<span class="comment_author"> <strong>多伦</strong>
						</span> 多伦路过
					</a></li>
				</ul>
			</div>
			<div class="clear"></div>
		</aside>
	</div>

</rapid:override>

<%@ include file="Public/framework.jsp"%>